HTMLify
style.css
Views: 9 | Author: huxn-webdev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | * { padding: 0; margin: 0; box-sizing: border-box; font-family: sans-serif; } body { min-height: 100vh; background-color: crimson; display: flex; flex-direction: column; justify-content: center; align-items: center; } .wrapper { max-width: 700px; height: 500px; width: 100%; border: 2px dashed white; text-align: center; position: relative; overflow: hidden; } .text { margin-bottom: 25px; color: #fff; } input { display: none; } .upload { background: white; padding: 8px 20px; transition: 0.4s ease; cursor: pointer; } .upload:hover { box-shadow: 0 4px 2px rgba(0, 0, 0, 0.2); } .img img { width: 99%; height: 99%; object-fit: cover; position: absolute; top: 2px; left: 2px; display: none; } .icon p.close { font-size: 20px; color: #fff; position: absolute; right: 20px; top: 10px; z-index: 1; display: none; cursor: pointer; } .wrapper .icon p.close:hover { color: crimson; } /* JavaScript */ .img img.active { display: block; } .wrapper .icon p.close.exit { display: block; } |